import { defineStore } from "pinia";

export const useMenuStore = defineStore('menu', {
    state: () => {
        return {
            selectedMenuItem: '',
            menuItems: [
                {
                    name: '仪表盘',
                    path: '/',
                },
                {
                    name: '书籍管理',
                    path: '/book',
                },
                {
                    name: '用户管理',
                    path: '/user',
                },
                {
                    name: '系统设置',
                    path: '/setting',
                },
            ]
        }
    },
    actions: {
        setSelectedMenuItem(menuItem: string) {
            this.selectedMenuItem = menuItem;
        }
    }
})